package com.igeek.collateral.entity;


import cn.hutool.core.date.DateTime;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
import net.sf.jsqlparser.expression.DateTimeLiteralExpression;
import org.springframework.format.annotation.DateTimeFormat;

import java.io.Serializable;
import java.util.Date;

@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@TableName("contracts")
@ApiModel(value="Contract对象", description="合同表")
public class Contract implements Serializable {

    @ApiModelProperty(value = "合同ID")
    @TableId(value = "id", type = IdType.AUTO)
    private Integer id;

    @ApiModelProperty(value = "服务周期")
    @TableField("service_period")
    private String servicePeriod;

    @ApiModelProperty(value = "金额")
    @TableField("amount")
    private Double amount;

    @ApiModelProperty(value = "甲方")
    @TableField("party_a")
    private String partyA;

    @ApiModelProperty(value = "乙方")
    @TableField("party_b")
    private String partyB;

    @ApiModelProperty(value = "合同名字")
    @TableField("contract_name")
    private String contractName;

    @ApiModelProperty(value = "模板编号")
    @TableField("template_id")
    private String templateId;

    @ApiModelProperty(value = "创建时间")
    @TableField("created_time")
    @DateTimeFormat(pattern = "yyyy-MM-dd")
    @JsonFormat(pattern = "yyyy-MM-dd")
    private Date createdTime;



    @ApiModelProperty(value = "押品编号")
    @TableField("collateral_id")
    private Integer collateralId;


    @ApiModelProperty(value = "路径")
    private String filePath;


    @ApiModelProperty(value = "是否删除")
    @TableField("is_deleted")
    private Integer isDeleted;





}
